package main

import (
	"fmt"
	"go.oop/encapsulation"
)

func main() {
	// 封装案例
	p := encapsulation.Factory("Jonathan")
	p.SetAge(30)
	p.SetSalary(10000)
	fmt.Println(*p) // {Jonathan 30 10000}
	fmt.Println(p.Name)
	fmt.Println(p.GetAge())
	fmt.Println(p.GetSalary())
}
